﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace OnlineShop
{
    /// <summary>
    /// Interaction logic for LoginShop.xaml
    /// </summary>
    public partial class LoginShop : Window
    {
        public LoginShop()
        {
            InitializeComponent();
        }

        private void OnBackToStartMenuClick(object sender, RoutedEventArgs e)
        {
            StartMenu window = new StartMenu();
            window.Show();
            this.Close();
        }

        private void OnLoginShopClick (object sender, RoutedEventArgs e)
        { 
            if ("admin" == this.name.Text && "admin" == this.password.Password)
            {
                ShopMenu window = new ShopMenu();
                window.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Invalid username or password");
                return;
            }
        }
    }
}
